SharePoint Learning Kit Customization
SLK Samples

The following samples demonstrate how to call the SLK API from applications.

Note  Although you can access the SLK API using any programming language compatible with the .NET common language runtime (CLR), the code samples in this documentation are all written in C#.

Sample Name Sample Type Description
CreateAssignments.cs Console Application Shows how to create an assignment given the URL of e-learning or non-e-learning content to assign, the URL of a Web site to assign to, a title for the assignment, the login name of an instructor, and the login names of one or more learners.
SimulateClass.cs Console Application Creates a simulated "virtual classroom" on a given SharePoint Web site. A number of assignments are created, assigned to students, and set to various states (not started, active, completed, and final). This sample can be used to help learn how to use the SLK API, and can also be used to populate a Web site with a set of assignments for testing other SLK components, such as Assignment List Web Part.
SimulateJobTraining.cs Console Application Creates a simulated job training program, by creating a number of local machine accounts (corresponding to simulated users), SharePoint Web sites, and SLK assignments (leveraging the SimulateClass.cs sample code). This sample application is primarily designed to be used for database load testing.
AddToUserWebLists.cs Console Application Adds Web sites to the user Web list (visible in the E-Learning Actions page in the SLK user interface) of a given set of users. The input is a spreadsheet in Microsoft Excel XML Spreadsheet format.
ProvisionFromExcel.cs Console Application Executes commands for partially provisioning SharePoint and SLK from a Microsoft Excel XML Spreadsheet. Implements commands to create SharePoint managed paths, site collections, and Web sites, and commands to add users to site collections and grant them access to Web sites. Also implements commands to configure site collections for use with SLK, activate the E-Learning Actions feature on Web sites, and update user Web lists (like the simpler AddToUserWebLists.cs sample). This sample code can create local machine accounts for test purposes, but not domain accounts—which is what a real provisioning system would likely do.
Report1.aspx Web Page A report page, based on a SharePoint master page (so that it includes common SharePoint user interface elements), which displays a list of all fully graded assignments for which the current user is an instructor. Clicking an assignment title opens the Grading page for that assignment.
Report2.aspx Web Page A report page, not based a SharePoint master page, which displays a grid of "final score" values for each graded learner assignment for which the current user is an instructor. Clicking an assignment title opens the Grading page for that assignment.
SiteCollectionInfo.aspx Web Page A report page that queries the SLK database directly, rather than using the SLK API. (The advantage of this approach is that the user can access information that would not normally be available through the SLK API. The disadvantage is that SLK cannot ensure that the current user is entitled to view the information displayed -- so this page requires the user to have direct database access permission.) This report displays information about SLK's mapping between the current SharePoint site collection (specified in the URL path) and the SLK database, as well as summary information about assignments within sites in that site collection.
AddInstructors.aspx.cs & AddInstructors.aspx Web Page Demonstrates how to add instructors to SLK assignments without the user being one of those instructors, to address scenarios such as the following: imagine that an instructor has created a number of assignments, with him or herself as the only instructor on those assignments, then unexpectedly quit and moved far away. How can an administrator reassign that instructor's assignments to a new instructor?
SampleWebService.asmx Web Service A sample Web service which accesses SLK.
For More Information
SLK Concepts
SLK Queries and Query Sets
SLK Settings
SLK API Overview
Microsoft.SharePointLearningKit Namespace (API Reference)
Next Topic: Overview of Microsoft Learning Components